home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Using a gxViewPort
- Sent: 6/14/96 1:53 PM
- Received: 6/14/96 2:01 PM
- From: Henri Lamiraux, lamiraux@apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >Whenever a FW_CGraphicContextGX is constructed, the facet's viewport is
- >mapped and clipped, and a new transform is created, mapped and clipped.
- >For optimum efficiency, it would be useful to instead create a child
- >viewport with the correct mapping and clip, and maintain that state until
- >a notification that there is a need to adjust the mapping and clip. Is
- >there a simple way to accomplish this in ODF?
- >
- >Thanks for any ideas.
- >
- >Humayun Lari
- >
-
- You can do that by overriding FW_CFame::FacetAdded,
- FW_CFrame::FacetRemoved and FW_CFrame::GeometryChanged. Create your child
- viewport in facetadded, destroy it in facetremoved and change what is
- needed in Geometrychanged and maybe frameshapechanged (I am not sure).
- You need to attach you child viewport to the facet by calling
- FW_SetFacetRefcon and get it back by calling FW_GetFacetRefcon (defined
- in FWFctInf.h in the graphic subsystem). Do not change the facet part
- info directly because ODF is using it.
-
- ........................................................................
- Henri Lamiraux lamiraux@apple.com
- Apple Computer, Inc. OpenDoc(tm) Development Framework
- ........................................................................
-
-